<template>
  <div class="app-container">
    <!-- <div class="queryform">
      <el-form
        :model="form"
        ref="form"
        label-width="97px"
        label-position="right"
      >
        <el-form-item label="场景名称:" prop="sceneId">
          <el-select v-model="form.sceneId" clearable>
            <el-option
              v-for="item in sceneList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="规则名称:" prop="ruleName">
          <el-input
            v-model.trim="form.ruleName"
            maxlength="128"
            placeholder="请输入"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="风险属性:" prop="riskField">
          <el-select v-model="form.riskField" clearable>
            <el-option
              v-for="item in riskFieldList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="规则类型:" prop="ruleType">
          <el-select v-model="form.ruleType" clearable>
            <el-option
              v-for="item in ruleTypeList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="refresh">查询</el-button>
          <el-button @click="resetForm">重置</el-button>
        </el-form-item>
      </el-form>
    </div> -->
    <!-- 操作栏 -->
    <!-- <div class="buttons">
      <el-button type="primary" icon="el-icon-plus" @click="add"
        >新增</el-button
      >
    </div> -->
    <div class="mod-result-table">
      <HTable
        ref="table"
        :tableData="tableData"
        :columnConfigs="columnConfigs"
        @selection-change="handleSelectionChange"
        :selectable="false"
        orderable
        :height="666"
        v-loading="loading"
        :pages="pagination"
        @page-change="handlePageChange"
        @size-change="handleSizeChange"
      >
        <template slot-scope="{ row }">
          <template v-if="row.name == 'action'">
            <el-button
              type="text"
              size="small"
              icon="el-icon-edit"
              @click="seedetail(row.row)"
              >详情</el-button
            >
          </template>
          <template v-else-if="row.name == 'Points'">
            {{ getintegrationPoints(row.row) }}
          </template>
          <template v-else-if="row.name == 'bonus'">
            {{ getintegrationbonus(row.row) }}
          </template>
          <template v-else-if="row.name == 'Strong'">
            <div
              v-for="(i, index) in row.row.strongs"
              :key="index"
              style="margin-bottom: 5px"
            >
              <el-tag>{{ i }}</el-tag>
            </div>
          </template>
          <template v-else-if="row.name == 'Strongintegration'">
            {{ getStrongintegration(row.row) }}
          </template>
          <template v-else-if="row.name == 'bifenList'">
            <div
              v-for="(i, index) in row.row.bifenList"
              :key="index"
              style="margin-bottom: 5px"
            >
              <el-tag type="warning">{{ i.str }}</el-tag>
            </div>
          </template>
          <template v-else-if="row.name == 'bifenListintegration'">
            {{ getbifenintergration(row.row) }}
          </template>
          <template v-else-if="row.name == 'totalfen'">
            {{ gettotalfen(row.row) }}
          </template>
        </template>
      </HTable>
    </div>
    <div class="vpnform">
      <rule
        ref="AddDialog"
        :dialogVisible1.sync="dialogVisible1"
        :editFlag.sync="editFlag"
        @submit="submitaddForm"
      ></rule>
    </div>
  </div>
</template>

<script>
import table from "@/mixins/commontable";
import rule from "./rule.vue";
import { columnConfigs } from "./columnConfigs.js";
import {
  getsaishiList,
  delCurRow,
  getsaijuList,
  getbetList,
} from "@/api/yybl/wstmodel";
import { mapState } from "vuex";
import {
  concatArr,
  SimplifysaishiList,
  deleteObject,
  roundToDecimalPlace,
} from "./data.js";
import {
  idvaltolist,
  koidlist,
  vallist,
  arr9,
  arr9kolist,
  tearr9kolist,
  tearr11kolist,
  tearr7kolist,
  tearr19kolist,
  arr11kolist,
  arr11,
  arr7kolist,
  arr13kolist,
  arr19kolist,
} from "./data1.js";
import {
  objko as objko1,
  objko2,
  tesaijuObj,
  tesaijuObj11,
  teobj7,
  teobj9,
  teobj19,
  teobj11,
  getrandomlist,
} from "./data2.js";
import log from "@/store/modules/log";
import zuihou from "./zuizhong";
export default {
  components: {
    rule,
  },
  mixins: [table], //表格的混入，主要包括表格上通用的方法和数据，比如查询，重置，分页这些功能
  props: {},
  data() {
    return {
      columnConfigs,
      dialogVisible1: false,
      editFlag: false,
      curRow: {},
      form: {
        sceneId: "",
        ruleName: "",
        riskField: "",
        ruleType: "",
      },
      tableData: concatArr,
      SimplifysaishiList,
      saijulist: [],
      oklist: [],
      nolist: [],
    };
  },
  watch: {},
  computed: {
    ...mapState("common", ["sceneList", "riskFieldList", "ruleTypeList"]), //函数中第一个是模块名称，第二个是模块中的数组
  },
  methods: {
    async getbetList() {
      try {
        const res = await getbetList();
        console.log(res, "5555");
      } catch (error) {
        console.log(error);
      }
    },
    getintegrationPoints(row) {
      // 单赛季排名前2得8分，前4的4分，前八得2分，前16得1分
      if (Number(row.Points) < 80000) {
        row.danPoints = 0;
        return "0分";
      } else {
        if (row.PlcInComp <= 2) {
          row.danPoints = 8;
          return "10分";
        } else if (row.PlcInComp > 2 && row.PlcInComp <= 4) {
          row.danPoints = 4;
          return "8分";
        } else if (row.PlcInComp > 4 && row.PlcInComp <= 6) {
          row.danPoints = 2;
          return "7分";
        } else if (row.PlcInComp > 6 && row.PlcInComp <= 8) {
          row.danPoints = 2;
          return "6分";
        } else if (row.PlcInComp > 8 && row.PlcInComp <= 12) {
          row.danPoints = 1;
          return "5分";
        } else if (row.PlcInComp > 12 && row.PlcInComp <= 16) {
          row.danPoints = 1;
          return "4分";
        } else {
          row.danPoints = 0;
          return "2分";
        }
      }
    },
    getintegrationbonus(row) {
      // 总排名前4得4分，前8得2分，前16得1分，前24得0分
      if (row.bonus && Number(row.bonus) < 200000) {
        row.bonusPoints = 0;
        return "0分";
      } else if (row.TotalPlcInComp) {
        if (row.TotalPlcInComp <= 2) {
          row.bonusPoints = 4;
          return "10分";
        }
        if (row.TotalPlcInComp > 2 && row.TotalPlcInComp <= 4) {
          row.bonusPoints = 4;
          return "9分";
        } else if (row.TotalPlcInComp > 4 && row.TotalPlcInComp <= 6) {
          row.bonusPoints = 2;
          return "8分";
        } else if (row.TotalPlcInComp > 6 && row.TotalPlcInComp <= 8) {
          row.bonusPoints = 2;
          return "7分";
        } else if (row.TotalPlcInComp > 8 && row.TotalPlcInComp <= 12) {
          row.bonusPoints = 1;
          return "6分";
        } else if (row.TotalPlcInComp > 12 && row.TotalPlcInComp <= 16) {
          row.bonusPoints = 1;
          return "5分";
        } else {
          row.bonusPoints = 0;
          return "4分";
        }
      } else {
        row.bonusPoints = 0;
        return "--";
      }
    },
    getStrongintegration1(row) {
      // 最近五届赛事止步情况，
      // 五场有三场冠军，两场32强以内（未参赛也算32强以内），且最新两场中的一场夺冠得10分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得8分），若不是得8分
      // 五场有两场冠军，一场亚军，两场32强以内（未参赛也算32强以内），且最新两场中的一场夺冠得10分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得8分），若不是得8分
      // 五场有两场冠军，两场4强，一场32强以内（未参赛也算32强以内），且最新两场中的一场夺冠得10分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得6分），若不是得6分
      // 五场有两场冠军，三场32强以内（未参赛也算32强以内），且最新两场中的一场夺冠得10分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得6分），若不是得6分
      // 五场有一场冠军，四场32强以内（未参赛也算32强以内），且最新两场中的一场夺冠得6分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得3分），若不是得3分
      // 五场有两场亚军，三场32强以内（未参赛也算32强以内），且最新两场中的一场夺亚得6分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得3分），若不是得3分
      // 五场有两场亚军，三场32强以内（未参赛也算32强以内），且最新两场中的一场夺亚得6分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得3分），若不是得3分
      // 五场有一场亚军，四场32强以内（未参赛也算32强以内），且最新两场中的一场夺亚得4分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得2分），若不是得2分
      // 五场有三场四强，两场32强以内（未参赛也算32强以内），且最新两场中的一场夺4强得4分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得2分），若不是得2分
      // 五场有两场四强，三场32强以内（未参赛也算32强以内），且最新两场中的一场夺4强得2分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得1分），若不是得1分
      // 五场有三场八强，两场32强以内（未参赛也算32强以内），且最新两场中的一场夺八强得1分（最新一场没参赛则按上一场比赛算，最新两场都没参赛，距离最新开始的比赛超过30天，得0分），若不是得0分
      if (row.strongs && row.strongs.length == 0) {
        return "--";
      } else {
        let arrfirst = row.strongs.filter((i) => i.includes(":冠军"));
        let arrsecend = row.strongs.filter(
          (i) => i.includes(":亚军") || i.includes(":冠军")
        );
        let arrthree = row.strongs.filter(
          (i) =>
            i.includes(":4强") || i.includes(":亚军") || i.includes(":冠军")
        );
        let arrfour = row.strongs.filter(
          (i) =>
            i.includes(":亚军") ||
            i.includes(":冠军") ||
            i.includes(":4强") ||
            i.includes(":8强")
        );
        let arrfive = row.strongs.filter(
          (i) =>
            i.includes(":16强") ||
            i.includes(":32强") ||
            i.includes(":4强") ||
            i.includes(":亚军") ||
            i.includes(":冠军")
        );
        let strongstwo = [row.strongs[0], row.strongs[1], row.strongs[2]];
        let twofirst = strongstwo.filter((i) => i.includes(":冠军"));
        let twosecend = strongstwo.filter(
          (i) => i.includes(":亚军") || i.includes(":冠军")
        );
        let twothree = strongstwo.filter(
          (i) =>
            i.includes(":4强") || i.includes(":亚军") || i.includes(":冠军")
        );
        let twofour = strongstwo.filter(
          (i) =>
            i.includes(":亚军") ||
            i.includes(":冠军") ||
            i.includes(":4强") ||
            i.includes(":8强")
        );
        let twofive = strongstwo.filter(
          (i) =>
            i.includes(":16强") ||
            i.includes(":32强") ||
            i.includes(":4强") ||
            i.includes(":亚军") ||
            i.includes(":冠军")
        );
        if (arrfirst.length >= 3) {
          if (twofirst.length > 0) {
            return "10分";
          } else {
            return "8分";
          }
        } else if (arrfirst.length == 2) {
          if (arrsecend.length > 0) {
            if (twofirst.length > 0) {
              return "10分";
            } else {
              return "8分";
            }
          } else if (arrthree.length > 1) {
            if (twofirst.length > 0) {
              return "10分";
            } else {
              return "6分";
            }
          } else if (arrfive.length > 2) {
            if (twofirst.length > 0) {
              return "10分";
            } else {
              return "6分";
            }
          } else {
            if (twofirst.length > 0) {
              return "10分";
            } else {
              return "4分";
            }
          }
        } else if (arrfirst.length == 1) {
          if (arrfive.length > 3) {
            if (twosecend.length > 0) {
              return "6分";
            } else {
              return "3分";
            }
          } else {
            if (twosecend.length > 0) {
              return "6分";
            } else {
              return "1分";
            }
          }
        } else if (arrfirst.length == 0) {
          if (arrsecend.length > 1) {
            if (arrfive.length > 2) {
              if (twosecend.length > 0) {
                return "6分";
              } else {
                return "3分";
              }
            } else {
              if (twofirst.length > 0) {
                return "6分";
              } else {
                return "1分";
              }
            }
          } else if (arrsecend.length == 1) {
            if (arrfive.length > 3) {
              if (twosecend.length > 0) {
                return "4分";
              } else {
                if (arrthree.length > 1 || arrfour.length > 2) {
                  if (twothree.length > 0) {
                    return "4分";
                  } else {
                    return "2分";
                  }
                } else {
                  return "2分";
                }
              }
            } else {
              if (twosecend.length > 0) {
                return "4分";
              } else {
                return "0分";
              }
            }
          } else if (arrsecend.length == 0) {
            if (arrthree.length > 2) {
              if (arrfive.length > 1) {
                if (twothree.length > 0) {
                  return "4分";
                } else {
                  return "2分";
                }
              } else {
                if (twothree.length > 0) {
                  return "4分";
                } else {
                  return "0分";
                }
              }
            } else if (arrthree.length == 2) {
              if (arrfive.length > 2) {
                if (twothree.length > 0) {
                  return "2分";
                } else {
                  return "1分";
                }
              } else {
                if (twothree.length > 0) {
                  return "2分";
                } else {
                  return "0分";
                }
              }
            } else if (arrthree.length >= 0) {
              if (arrfour.length > 2 && arrfive.length > 1) {
                if (twothree.length > 0) {
                  return "2分";
                } else {
                  return "0分";
                }
              } else {
                return "0分";
              }
            }
          }
        }
        return "123";
      }
    },
    getStrongintegration(row) {
      // 十届赛事
      // 三冠=六亚=十二次四强  12
      // 两冠一亚=5.5亚=十一次四强 11
      // 两冠=4.5亚=九次四强 9
      // 一冠两亚=4亚=八次四强 8
      // 一冠一亚=3.5亚=七次四强 7
      // 三亚=五次四强 5
      // 两亚=3.5次四强 3.5
      // 一冠=1.5亚=三次四强 3
      // 一亚=1.5次四强 1.5
      // 最近三届赛事得到过1次冠军加1.5分
      // 亚军1分
      // 四强0.5分
      if (row.strongs && row.strongs.length == 0) {
        return "--";
      } else {
        let arrfirst = row.strongs.filter((i) => i.includes(":冠军"));
        let arrsecend = row.strongs.filter((i) => i.includes(":亚军"));
        let arrthree = row.strongs.filter((i) => i.includes(":4强"));
        let arrfour = row.strongs.filter((i) => i.includes(":8强"));

        let strongstwo = [row.strongs[0], row.strongs[1], row.strongs[2]];
        let twofirst = strongstwo.filter((i) => i.includes(":冠军"));
        let twosecend = strongstwo.filter((i) => i.includes(":亚军"));
        let twothree = strongstwo.filter((i) => i.includes(":4强"));
        let twofour = strongstwo.filter((i) => i.includes(":8强"));
        const getsanfen = (arr1, arr2, arr3) => {
          if (arr1.length > 0) {
            return 2;
          } else if (arr2.length > 0) {
            return 1;
          } else if (arr3.length > 0) {
            return 0.5;
          } else {
            return 0;
          }
        };
        const getbaqiangfen = (arr1, arr2) => {
          if (arr1.length >= 3 && arr2.length > 0) {
            return 5;
          } else if (arr1.length >= 3) {
            return 3;
          } else {
            return 0;
          }
        };
        const getsiqiang = (arr1, arr2, arr3) => {
          const a = arr1.length;
          const b = arr2.length;
          const c = arr3.length;
          let d = 0;
          if (a > 3) {
            d = 13;
          } else if (a === 3) {
            d = 12.5;
          } else if (a == 2 && b == 2) {
            d = 12;
          } else if (a == 2 && b == 1) {
            d = 12;
          } else if (a == 2 && b == 0) {
            d = 11.5;
          } else if (a == 1 && b == 2) {
            d = 11;
          } else if (a == 1 && b == 1) {
            d = 10.5;
          } else if (a == 0 && b == 3) {
            d = 10;
          } else if (a == 0 && b == 2) {
            d = 9;
          } else if (a == 1 && b == 0) {
            d = 9;
          } else if (a == 0 && b == 1) {
            d = 8;
          }
          if (d == 0 && c <= 1) {
            const baqiangfen = getbaqiangfen(arrfour, twofour);
            console.log(baqiangfen);
            d = c + baqiangfen;
          } else if (d < 10) {
            d = d + c;
          } else {
            d = d + 0;
          }
          return d;
        };
        const siqiangfen = getsiqiang(arrfirst, arrsecend, arrthree);
        const sanfen = getsanfen(twofirst, twosecend, twothree);
        const total = siqiangfen + sanfen;
        // 四舍五入到指定的小数位数
        // 四舍五入到两位小数
        let roundedNumber = roundToDecimalPlace((total / 15) * 10, 2);
        return roundedNumber + "分";
      }
    },
    getbifenintergration(row) {
      // 最近五场比赛，五场全胜得5分；胜4场得4分；胜3场得3分，但最新的两场都输了则得1分；胜两场不得分，但最新的两场连胜则得1分
      if (row.bifenwinedList && row.bifenwinedList.length == 0) {
        return "--1";
      } else {
        if (row.bifenwinedList.length < 3) {
          return "--2";
        } else {
          let arrfirst = row.bifenwinedList.filter((i) => i);
          let bifenwinedListthree = [
            row.bifenwinedList[0],
            row.bifenwinedList[1],
            row.bifenwinedList[2],
          ];
          let bifenwinedListtwo = [
            row.bifenwinedList[0],
            row.bifenwinedList[1],
          ];
          let bifenrefirst = bifenwinedListthree.filter((i) => i);
          let bifenwofirst = bifenwinedListtwo.filter((i) => i);
          if (arrfirst.length == 5) {
            return "10分";
          } else if (arrfirst.length == 4) {
            if (bifenwofirst.length == 2) {
              return "8分";
            } else {
              return "7分";
            }
          } else if (arrfirst.length == 3) {
            if (bifenrefirst.length == 3) {
              return "7分";
            } else {
              return "5分";
            }
          } else if (arrfirst.length == 2) {
            if (bifenwofirst.length == 2) {
              return "5分";
            } else {
              return "4分";
            }
          } else if (arrfirst.length == 1) {
            return "3分";
          } else {
            return "0分";
          }
        }
      }
    },
    gettotalfen(row) {
      let danPoints = this.getintegrationPoints(row);
      let bonusPoints = this.getintegrationbonus(row);
      let strongPoints = this.getStrongintegration(row);
      let bifenPoints = this.getbifenintergration(row);
      const gN = (str) => {
        let strr = "";
        if (str.includes("分")) {
          strr = str.replace(/分/, "");
          let num = Number(strr);
          if (typeof num == "number") {
            return num;
          } else {
            return 0;
          }
        } else {
          return 0;
        }
      };
      // console.log(danPoints,gN(danPoints));
      // console.log(strongPoints, gN(strongPoints));
      let total = 0;
      total =
        gN(danPoints) * 3 +
        gN(bonusPoints) * 1.5 +
        gN(strongPoints) * 4 +
        gN(bifenPoints) * 1.5;
      let roundedNumber = roundToDecimalPlace(total, 2);
      // return roundedNumber + "分";
      row.total = roundedNumber;
      return roundedNumber;
    },
    async seedetail(row) {
      try {
        let params = {
          playerid: row.PlayerId,
          pageSize: 10,
          currentpg: 1,
        };

        const res = await getsaishiList(params);
        if (res.PaimingList.length > 0) {
          let arr = res.PaimingList.map((i) => {
            return `${i.CompeteTitle}:${i.Strong}`;
          });
          // let str = arr.join(";    ");
          row.strongs = arr;
        }
      } catch (error) {
        console.log(error);
      }
      try {
        const arr = this.saijulist.filter(
          (i) => i.PlayerId == row.PlayerId || i.VsPlayerId == row.PlayerId
        );
        if (arr.length > 10) {
          arr.splice(10);
        }
        function removeWhitespace(str) {
          if (typeof str == "string") {
            return str.replace(/\s+/g, "");
          } else {
            return str;
          }
        }
        let listarr = arr.map((i) => {
          i.PlayerNm_C = removeWhitespace(i.PlayerNm_C);
          i.Wins = removeWhitespace(i.Wins);
          i.VsWins = removeWhitespace(i.VsWins);
          i.PlayerNm_C_Vs = removeWhitespace(i.PlayerNm_C_Vs);

          let wined = "平局";
          if (i.PlayerId == row.PlayerId) {
            if (Number(i.VsWins) < 0) {
              i.VsWins = 0;
            }
            if (Number(i.Wins) < 0) {
              i.Wins = 0;
            }
            wined = Number(i.Wins) > Number(i.VsWins);
          } else if (i.VsPlayerId == row.PlayerId) {
            wined = Number(i.VsWins) > Number(i.Wins);
          }
          return {
            PlayerNm_C: i.PlayerNm_C,
            Wins: i.Wins,
            VsWins: i.VsWins,
            wined,
            PlayerNm_C_Vs: i.PlayerNm_C_Vs,
            str: `${i.PlayerNm_C}-[${i.Wins}:${i.VsWins}]-${i.PlayerNm_C_Vs}`,
          };
        });
        row.bifenList = deleteObject(listarr);
        row.bifenList = row.bifenList.filter(
          (i) => !(i.Wins == 0 && i.VsWins == 0)
        );
        if (row.bifenList.length > 5) {
          row.bifenList.splice(5);
        }
        row.bifenwinedList = row.bifenList.map((i) => i.wined);
        // let str = arr.join(";    ");
        // row.bifenlist = [...new Set(list)];
        // console.log(row.bifenListall);
      } catch (error) {
        console.log(error);
      }
    },
    async getSaijuList() {
      let data = [];
      for (let index = 1; index < 20; index++) {
        let params = {
          currentpg: index,
        };
        const res = await getsaijuList(params);
        if (data.length < 1390) {
          if (res.bifen && res.bifen.length > 0) {
            data = [...data, ...res.bifen];
          } else {
            console.log(res, index);
          }
        } else {
          console.log(index);
        }
      }
      console.log(data, "saiju");
      // console.log(data, 123);
      this.saijulist = data.filter(
        (i) => i.CompeteTitle != "2024巡回锦标赛123"
      );
    },
    formatTrancy(val) {
      let a = Number(val);
      return Math.round(a * 100) + "%";
    },
    add() {
      this.editFlag = false;
      this.dialogVisible1 = true;
      this.$nextTick(() => {
        this.$refs.AddDialog.add();
      });
    },
    edit(row) {
      this.editFlag = true;
      this.dialogVisible1 = true;
      this.curRow = row;
      this.$refs.AddDialog.edit(row);
    },
    async handleDelete(row) {
      this.$confirm("此操作将删除数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(async () => {
          let ids = [];
          console.log(row);
          if (row) {
            ids.push(row.id);
          }
          console.log(ids);
          const res = await delCurRow({
            ids,
          });
          if (res.rescode == "200") {
            this.$message.success("删除成功");
            this.refresh();
          } else this.$message.error(res.msg);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    submitaddForm(val) {
      if (val == 200) {
        this.refresh();
      }
    },
    handleClose() {
      this.dialogVisible1 = false;
    },
    handleSelectionChange() {},
    getparams() {
      const { sceneId, ruleName, riskField, ruleType } = this.form;
      return {
        sceneId,
        ruleName,
        riskField,
        ruleType,
      };
    },
    refresh() {
      // this.getlists(getList, this.getparams());
      console.log(this.tableData);
    },
    resetForm() {
      this.$nextTick(() => {
        this.$refs["form"].resetFields();
        this.refresh();
      });
    },
  },
  created() {
    this.refresh();
    this.getSaijuList();
    this.getbetList();
  },
  mounted() {},
};
</script>
<style lang="scss" scoped>
.queryform {
  ::v-deep .el-form {
    display: flex;
    flex-wrap: wrap;

    .el-form-item {
      max-width: 33.3%;
      flex-grow: 1;
      flex-shrink: 1;
      flex-basis: 33.3%;
    }

    // .el-form-item:nth-child(7) {
    //   max-width: 100%;
    //   flex-basis: 100%;
    //   display: flex;
    //   justify-content: end;
    // }
  }
}
::v-deep .el-form-item__content {
  .el-date-editor.el-input {
    width: 100%;
  }
}
::v-deep .el-button {
  .el-icon-edit + span {
    margin-left: 0px;
  }
  .el-icon-delete + span {
    margin-left: 0px;
  }
}
::v-deep .el-dialog {
  min-width: 640px;
  .el-dialog__header {
    border-bottom: 1px solid #e8e8e8;
  }
  .el-dialog__footer {
    border-top: 1px solid #e8e8e8;
  }
}
.addDialog {
  .el-dialog {
    min-width: 640px;
  }

  .el-form {
    .el-form-item.slider {
      width: 100%;
    }
  }
}
</style>
